package com.weharvest.edu.converter;

import com.weharvest.edu.dto.BackstageRoleAndMenuAndPermissionDTO;
import com.weharvest.edu.entity.between.BackstageRoleMenu;
import com.weharvest.edu.entity.between.BackstageRoleMenuPermission;
import com.weharvest.edu.view.BackstagePermissionView;

import java.util.ArrayList;
import java.util.List;

public class BackstageAuthorizationConverter {

//    public static List<BackstageRoleMenu> converterResultBrm(
//            BackstageRoleAndMenuAndPermissionDTO bRMP){
//        List<BackstageRoleMenu>backstageRoleMenuList=new ArrayList<>();
//        for(BackstagePermissionView backstagePermissionView:bRMP.getPermissions()){
//            BackstageRoleMenu backstageRoleMenu=new BackstageRoleMenu();
//            backstageRoleMenu.setRoleId(bRMP.getRoleId());
//            backstageRoleMenu.setMenuId(backstagePermissionView.getMenuId());
//            backstageRoleMenuList.add(backstageRoleMenu);
//        }
//        return  backstageRoleMenuList;
//    }
//
//    public static List<BackstageRoleMenuPermission> converterResultBrmp(
//            BackstageRoleAndMenuAndPermissionDTO bRMP){
//        List<BackstageRoleMenuPermission>backstageRoleMenuPermissionList=new ArrayList<>();
//        for(BackstagePermissionView backstagePermissionView:bRMP.getPermissions()){
//            BackstageRoleMenuPermission backstageRoleMenuPermission=new BackstageRoleMenuPermission();
//            backstageRoleMenuPermission.setRoleId(bRMP.getRoleId());
//            backstageRoleMenuPermission.setMenuId(backstagePermissionView.getMenuId());
//            backstageRoleMenuPermission.setPermissionId(backstagePermissionView.getId());
//            backstageRoleMenuPermissionList.add(backstageRoleMenuPermission);
//        }
//        return  backstageRoleMenuPermissionList;
//    }
}
